<template>
  <div id="shenQing">
    <ul>
      <li v-show="contentData.length > 0" v-for="(item, index) in contentData" @click="handle(item)" :key="index">
        <p style="font-weight: bold; height: 30px">
          <span style="float: left">{{ item.NODE_NAME }}</span>
          <span style="float: right">{{ item.SQR }}</span>
        </p>
        <p style="font-size: 14px; color: #848484; height: 30px">
          <span style="float: left">鉴定公司：{{ item.JDJG }}</span>
          <span style="float: right">{{  item.JDSJ }}</span>
        </p>
        <p style="font-size: 14px; color: #848484; height: 30px">
          <span style="float: left">地址：{{ item.FWDZ?item.FWDZ:'暂无数据' }}</span>
        </p>
      </li>
      <div style="height: 60vh;text-align:center;padding-top: 20vh;" v-show="contentData.length == 0">
        <div style="margin-bottom: 10px;">
          <img src="https://nfzjszlb.jst.zj.gov.cn/serverfile/zheliban/icon/DSF/50.png">
        </div>
        <div>暂无数据</div>
      </div>
    </ul>
  </div>
</template>
<script>
import { QuerySignCallback } from "../../utils/api";
export default {
  data () {
    return {
      contentData: []
    }
  },
  methods: {
    getdata: async function () {
      let params2 = {
	    "accessCode": "688bd3883572440a859dfd8ba9194e7b",
	    "cityCode": window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '',
	    "params": {
		    dataguid: "35cd2edf-ec8b-40e4-a4d4-4e706015fe32",
        searchObject: [],
        bizGuid: "d718f2a6-6d0a-42d2-9f03-e396fd056b79",
        token: window.localStorage.getItem("token"),
	      }
      } 
      var res1 = await QuerySignCallback(params2);
      this.contentData = eval("("+res1.data.data+")").Data;
      this.$store.commit('getContent', this.contentData)
      this.contentData.forEach(item=>{
        item.JDSJ =  String(item.JDSJ).substring(0, String(item.JDSJ).length - 8).trim();
      })
    },
    handle (data) {
      if (data.PROC_GUID) {
        this.$router.push({
          path: "/KeyLine",
          query: { PROC_GUID: data.PROC_GUID }
        });
      } else {
        this.$toast.fail('暂无环节信息');
        // this.$notify({ type: 'warning', message: '暂无环节信息' });
      }
    }
  },
  mounted () {
   this.getdata();
  }
}
</script>
<style lang='scss' scoped>
#shenQing {
  height: 82vh;
  overflow: auto;
  font-family: "Helvetica Neue", Helvetica, STHeiTi, sans-serif;
  ul li {
    padding: 10px;
    height: 90px;
    border-bottom: 1px solid #d2d2d2;
    margin-bottom: 10px;
  }
}
</style>
